import api from './index'

// 获取支付配置列表
export const getPaymentConfigs = () => {
  return api.get('/payment/config')
}

// 获取支付配置详情
export const getPaymentConfigById = (id: number) => {
  return api.get(`/payment/config/${id}`)
}

// 创建支付配置
export const createPaymentConfig = (data: any) => {
  return api.post('/payment/config', data)
}

// 更新支付配置
export const updatePaymentConfig = (id: number, data: any) => {
  return api.put(`/payment/config/${id}`, data)
}

// 删除支付配置
export const deletePaymentConfig = (id: number) => {
  return api.delete(`/payment/config/${id}`)
}